Skip to content

Fix buffer overrun in ConvertAudio with different src/dst channel count #12064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

hspir404
Copy link
Contributor

@hspir404 hspir404 commented Jan 23, 2025

To trigger this bug, the source and destination channel count have to not match, and the source format also has to not be f32.

Description

This fixes a buffer overrun (and intermittent crash) when playing audio from the opening FMV of Bloodborne in the ShadPS4 emulator. That audio is in 8 channel, s16le format, which triggers an audio conversion code path that probably isn't very common.

Existing Issue(s)

shadps4-emu/shadPS4#2034

- Source or destination format also has to not be F32 to trigger bug
@IceDBorn
Copy link

Does this fix all broken cutscenes or just the intro?

@slouken slouken added this to the 3.2.2 milestone Jan 23, 2025
@slouken slouken requested a review from icculus January 23, 2025 15:17
Copy link
Collaborator

@slouken slouken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to me, @icculus?

@icculus icculus merged commit 72a3eae into libsdl-org:main Jan 23, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants